Imports StartPoint.BR.Interfaces

Namespace Listados

    Public Class Rubros
        Inherits StartFrame.US.Listador

        Dim _rubros As IRubro

#Region " Windows Form Designer generated code "

        Public Sub New()
            MyBase.New()

            'This call is required by the Windows Form Designer.
            InitializeComponent()

            'Add any initialization after the InitializeComponent() call

        End Sub

        'Form overrides dispose to clean up the component list.
        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
            If disposing Then
                If Not (components Is Nothing) Then
                    components.Dispose()
                End If
            End If
            MyBase.Dispose(disposing)
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.  
        'Do not modify it using the code editor.
        Friend WithEvents cd_rubro As LnkDesdeHastaFK
        Friend WithEvents cd_subrubro As LnkDesdeHastaFK
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
            Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Rubros))
            Me.cd_rubro = New LnkDesdeHastaFK()
            Me.cd_subrubro = New LnkDesdeHastaFK()
            Me.TabPage1.SuspendLayout()
            CType(Me.lnk_dataSet, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'TabPage1
            '
            Me.Contenedor.Controls.AddRange(New System.Windows.Forms.Control() {Me.cd_subrubro, Me.cd_rubro})
            Me.TabPage1.Size = New System.Drawing.Size(483, 306)
            '
            'lblTitulo
            '
            Me.lblTitulo.Text = "Rubros y Subrubros"
            Me.lblTitulo.Visible = True
            '
            'lblReporte
            '
            Me.lblReporte.Visible = True
            '
            'cboReporte
            '
            Me.cboReporte.ItemHeight = 13
            Me.cboReporte.Size = New System.Drawing.Size(309, 21)
            Me.cboReporte.ValueMember = "ID"
            Me.cboReporte.Visible = True
            '
            'cd_rubro
            '
            Me.cd_rubro.BackColor = System.Drawing.SystemColors.ControlLight
            Me.cd_rubro.Desde = ""
            Me.cd_rubro.Hasta = "zzzzzzzzzz"
            Me.cd_rubro.Location = New System.Drawing.Point(130, 50)
            Me.cd_rubro.LvCampo = "cd_rubro"
            Me.cd_rubro.LvTabla = "tad_rubros"
            Me.cd_rubro.Name = "cd_rubro"
            Me.cd_rubro.Size = New System.Drawing.Size(302, 20)
            Me.cd_rubro.TabIndex = 6
            Me.cd_rubro.Valida = True
            '
            'cd_subrubro
            '
            Me.cd_subrubro.BackColor = System.Drawing.SystemColors.ControlLight
            Me.cd_subrubro.Desde = ""
            Me.cd_subrubro.Hasta = "zzzzzzzzzz"
            Me.cd_subrubro.Location = New System.Drawing.Point(130, 75)
            Me.cd_subrubro.LvCampo = "cd_subrubro"
            Me.cd_subrubro.LvTabla = "tld_subrubros"
            Me.cd_subrubro.Name = "cd_subrubro"
            Me.cd_subrubro.Size = New System.Drawing.Size(302, 20)
            Me.cd_subrubro.TabIndex = 7
            Me.cd_subrubro.Valida = True
            '
            'Rubros
            '
            Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
            Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Bitmap)
            Me.ClientSize = New System.Drawing.Size(564, 384)
            Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblTitulo})
            Me.Name = "Rubros"
            Me.TabPage1.ResumeLayout(False)
            CType(Me.lnk_dataSet, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)

        End Sub

#End Region

        Private Sub Rubros_OnLoadForm(ByRef reportCollection As StartFrame.US.Listador.Reports) Handles MyBase.OnLoadForm

            Dim rpt As Report
            Dim rangoRubro As New Rango(1, "cd_rubro", cd_rubro)
            Dim rangoSubRubro As New Rango(2, "cd_subrubro", cd_subrubro)

            rpt = New Report(1, "TLRubros_rubros", "Rubros", "tlrubros_rubros", "US.spmc.stock.reportes")
            rpt.Rangos.Add(rangoRubro)
            reportCollection.Add(rpt)

            rpt = New Report(2, "TLRubros_subrubros", "Subrubros", "tlrubros_subrubros", "US.spmc.stock.reportes")
            rpt.Rangos.Add(rangoRubro)
            rpt.Rangos.Add(rangoSubRubro)
            reportCollection.Add(rpt)

            _rubros = CType(RemotingHelper.getObject(GetType(IRubro)), IRubro)
            Me.ObjetoReglasNegocio = _rubros

        End Sub

    End Class

End Namespace
